package com.pro.system.entity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name = "pay")
public class Pay {

    @Id
    private Integer payId;   //支付id

    private float money;   //支付金额

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date; // 支付时间

    @OneToMany(mappedBy = "pay")
    private List<Purchase> purchases;

    public Pay(){

    }
}
